#include <iostream>
#include <vector>
#include <string>

using namespace std;
/*
14-9 Inherit a class StringVector from vector<void*> and redefine the push_back( ) and operator[] member functions to accept and produce string*. What happens if you try to push_back( ) a void*?
*/
class StringVector: public vector<void*>{
	string arr[10];
	int index;
public:
	StringVector():index(0){
		
	}
	void push_back(string s){
		arr[index] = s;
		index++;
	}
	
	string operator[](int ind){
		return arr[ind];
	}
};
int main(int argc, char *argv[]) {
	StringVector sv;
	sv.push_back("class StringVector inherits from vector<void*> successfully.");
	cout << sv[0] << endl;
}